package team.jaman.autosell.dao;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import team.jaman.autosell.entity.Orders;
import team.jaman.autosell.entity.OrdersExample;
import team.jaman.autosell.tools.OrdersCount;
/**
 * 订单dao
 * @author Administrator
 *
 */
@Repository
public interface OrdersMapper {
	/**
	 * 根据用户名关键字模糊检索
	 * @param urerkeyword 用户名关键字
	 * @return
	 */
	public List<Orders> selectOrdersByUser(String userkeyword); 
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    long countByExample(OrdersExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    int deleteByExample(OrdersExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    int deleteByPrimaryKey(String orderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    int insert(Orders record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    int insertSelective(Orders record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    List<Orders> selectByExample(OrdersExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    Orders selectByPrimaryKey(String orderId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    int updateByExampleSelective(@Param("record") Orders record, @Param("example") OrdersExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    int updateByExample(@Param("record") Orders record, @Param("example") OrdersExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    int updateByPrimaryKeySelective(Orders record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table orders
     *
     * @mbg.generated Tue Jun 16 10:44:18 CST 2020
     */
    int updateByPrimaryKey(Orders record);
    /**
     * 每日订单数
     * @return
     */
    public List<OrdersCount> selectOrdersCountDay();
    /**
     * 每月订单数
     * @return
     */
    public List<OrdersCount> selectOrdersCountMonth();
    /**
     * 
     * @param example
     * @return
     */
    List<Orders> selectByUserId(int userId);
}